// 获取动态颜色变量
@import '~ant-design-vue/lib/style/index.less';
@root-entry-name: variable;

// .ant-btn:focus:not(.ant-btn-primary):not(.ant-btn-danger), .ant-btn:hover:not(.ant-btn-primary):not(.ant-btn-danger) {
//     color: inherit !important;
//     background-color: inherit !important;
// }

.y-button+.y-button {
  margin-left: 10px;
}

.y-button--default {
  background-color: #fff;
  border: 1px solid #dcdfe6;
  color: #606266;
}

.y-button--default:focus,
.y-button--default:hover {
  color: @primary-color;
  border-color: mix(#fff, @primary-color, 70%);
  // background-color: mix(#fff, @primary-color, 90%);
  background-color: color(~`colorPalette('@{primary-color}', 1) `);
}

.y-button--default:active {
  color: color(~`colorPalette('@{primary-color}', 4) `);
  border-color: color(~`colorPalette('@{primary-color}', 4) `);
  outline: none;
}

.y-button--default.is-plain:focus,
.y-button--default.is-plain:hover {
  background-color: #fff;
  border-color: @primary-color;
  color: @primary-color;
}

.y-button--default.is-plain:active {
  background-color: #fff;
  outline: none;
}

.y-button--default.is-active,
.y-button--default.is-plain:active {
  border-color: color(~`colorPalette('@{primary-color}', 4) `);
  color: color(~`colorPalette('@{primary-color}', 4) `);
}

.y-button--default.is-disabled,
.y-button--default.is-disabled:focus,
.y-button--default.is-disabled:hover {
  color: #c0c4cc;
  cursor: not-allowed;
  background-image: none;
  background-color: #fff;
  border-color: #ebeef5;
}

.y-button--default.is-disabled.y-button--default--text {
  background-color: transparent;
}

.y-button--default.is-disabled.is-plain,
.y-button--default.is-disabled.is-plain:focus,
.y-button--default.is-disabled.is-plain:hover {
  background-color: #fff;
  border-color: #ebeef5;
  color: #c0c4cc;
}

.y-button--primary {
  color: #fff;
  background-color: @primary-color;
  border-color: @primary-color;
}

.y-button--primary:focus,
.y-button--primary:hover {
  background-color: mix(#fff, @primary-color, 20%);
  border-color: mix(#fff, @primary-color, 20%);
  color: #fff;
}

.y-button--primary:active {
  outline: none;
}

.y-button--primary.is-active,
.y-button--primary:active {
  background-color: color(~`colorPalette('@{primary-color}', 4) `);
  border-color: color(~`colorPalette('@{primary-color}', 4) `);
  color: #fff;
}

.y-button--primary.is-disabled,
.y-button--primary.is-disabled:active,
.y-button--primary.is-disabled:focus,
.y-button--primary.is-disabled:hover {
  color: #fff;
  background-color: mix(#fff, @primary-color, 50%);
  border-color: mix(#fff, @primary-color, 50%);
}

.y-button--primary.is-plain {
  color: @primary-color;
  // background-color: mix(#fff, @primary-color, 92%);
  background-color: color(~`colorPalette('@{primary-color}', 1) `);
  border-color: mix(#fff, @primary-color, 60%);
}

.y-button--primary.is-plain:focus,
.y-button--primary.is-plain:hover {
  background-color: @primary-color;
  border-color: @primary-color;
  color: #fff;
}

.y-button--primary.is-plain:active {
  background-color: color(~`colorPalette('@{primary-color}', 8) `);
  border-color: color(~`colorPalette('@{primary-color}', 8) `);
  color: #fff;
  outline: none;
}

.y-button--primary.is-plain.is-disabled,
.y-button--primary.is-plain.is-disabled:active,
.y-button--primary.is-plain.is-disabled:focus,
.y-button--primary.is-plain.is-disabled:hover {
  color: mix(#fff, @primary-color, 40%);
  background-color: color(~`colorPalette('@{primary-color}', 1) `);
  border-color: mix(#fff, @primary-color, 80%);
}

.y-button--success {
  color: #fff !important;
  background-color: #67c23a !important;
  border-color: #67c23a !important;
}

.y-button--success:focus,
.y-button--success:hover {
  background-color: #85ce61 !important;
  border-color: #85ce61 !important;
  color: #fff !important;
}

.y-button--success:active {
  outline: none;
}

.y-button--success.is-active,
.y-button--success:active {
  background-color: #5daf34 !important;
  border-color: #5daf34 !important;
  color: #fff !important;
}

.y-button--success.is-disabled,
.y-button--success.is-disabled:active,
.y-button--success.is-disabled:focus,
.y-button--success.is-disabled:hover {
  color: #fff !important;
  background-color: #b3e19d !important;
  border-color: #b3e19d !important;
}

.y-button--success.is-plain {
  color: #67c23a !important;
  background-color: #f0f9eb !important;
  border-color: #c2e7b0 !important;
}

.y-button--success.is-plain:focus,
.y-button--success.is-plain:hover {
  background-color: #67c23a !important;
  border-color: #67c23a !important;
  color: #fff !important;
}

.y-button--success.is-plain:active {
  background-color: #5daf34 !important;
  border-color: #5daf34 !important;
  color: #fff !important;
  outline: none;
}

.y-button--success.is-plain.is-disabled,
.y-button--success.is-plain.is-disabled:active,
.y-button--success.is-plain.is-disabled:focus,
.y-button--success.is-plain.is-disabled:hover {
  color: #a4da89 !important;
  background-color: #f0f9eb !important;
  border-color: #e1f3d8 !important;
}

.y-button--warning {
  color: #fff !important;
  background-color: #e6a23c !important;
  border-color: #e6a23c !important;
}

.y-button--warning:focus,
.y-button--warning:hover {
  background-color: #ebb563 !important;
  border-color: #ebb563 !important;
  color: #fff !important;
}

.y-button--warning:active {
  outline: none;
}

.y-button--warning.is-active,
.y-button--warning:active {
  background-color: #cf9236 !important;
  border-color: #cf9236 !important;
  color: #fff !important;
}

.y-button--warning.is-disabled,
.y-button--warning.is-disabled:active,
.y-button--warning.is-disabled:focus,
.y-button--warning.is-disabled:hover {
  color: #fff !important;
  background-color: #f3d19e !important;
  border-color: #f3d19e !important;
}

.y-button--warning.is-plain {
  color: #e6a23c !important;
  background-color: #fdf6ec !important;
  border-color: #f5dab1 !important;
}

.y-button--warning.is-plain:focus,
.y-button--warning.is-plain:hover {
  background-color: #e6a23c !important;
  border-color: #e6a23c !important;
  color: #fff !important;
}

.y-button--warning.is-plain:active {
  background-color: #cf9236 !important;
  border-color: #cf9236 !important;
  color: #fff !important;
  outline: none;
}

.y-button--warning.is-plain.is-disabled,
.y-button--warning.is-plain.is-disabled:active,
.y-button--warning.is-plain.is-disabled:focus,
.y-button--warning.is-plain.is-disabled:hover {
  color: #f0c78a !important;
  background-color: #fdf6ec !important;
  border-color: #faecd8 !important;
}

.y-button--danger {
  color: #fff !important;
  background-color: #f56c6c !important;
  border-color: #f56c6c !important;
}

.y-button--danger:focus,
.y-button--danger:hover {
  background-color: #f78989 !important;
  border-color: #f78989 !important;
  color: #fff !important;
}

.y-button--danger:active {
  outline: none;
}

.y-button--danger.is-active,
.y-button--danger:active {
  background-color: #dd6161 !important;
  border-color: #dd6161 !important;
  color: #fff !important;
}

.y-button--danger.is-disabled,
.y-button--danger.is-disabled:active,
.y-button--danger.is-disabled:focus,
.y-button--danger.is-disabled:hover {
  color: #fff !important;
  background-color: #fab6b6 !important;
  border-color: #fab6b6 !important;
}

.y-button--danger.is-plain {
  color: #f56c6c !important;
  background-color: #fef0f0 !important;
  border-color: #fbc4c4 !important;
}

.y-button--danger.is-plain:focus,
.y-button--danger.is-plain:hover {
  background-color: #f56c6c !important;
  border-color: #f56c6c !important;
  color: #fff !important;
}

.y-button--danger.is-plain:active {
  background-color: #dd6161 !important;
  border-color: #dd6161 !important;
  color: #fff !important;
  outline: none;
}

.y-button--danger.is-plain.is-disabled,
.y-button--danger.is-plain.is-disabled:active,
.y-button--danger.is-plain.is-disabled:focus,
.y-button--danger.is-plain.is-disabled:hover {
  color: #f9a7a7 !important;
  background-color: #fef0f0 !important;
  border-color: #fde2e2 !important;
}

.y-button--info {
  color: #fff !important;
  background-color: #909399 !important;
  border-color: #909399 !important;
}

.y-button--info:focus,
.y-button--info:hover {
  background-color: #a6a9ad !important;
  border-color: #a6a9ad !important;
  color: #fff !important;
}

.y-button--info:active {
  outline: none;
}

.y-button--info.is-active,
.y-button--info:active {
  background-color: #82848a !important;
  border-color: #82848a !important;
  color: #fff !important;
}

.y-button--info.is-disabled,
.y-button--info.is-disabled:active,
.y-button--info.is-disabled:focus,
.y-button--info.is-disabled:hover {
  color: #fff !important;
  background-color: #c8c9cc !important;
  border-color: #c8c9cc !important;
}

.y-button--info.is-plain {
  color: #909399 !important;
  background-color: #f4f4f5 !important;
  border-color: #d3d4d6 !important;
}

.y-button--info.is-plain:focus,
.y-button--info.is-plain:hover {
  background-color: #909399 !important;
  border-color: #909399 !important;
  color: #fff !important;
}

.y-button--info.is-plain:active {
  background-color: #82848a !important;
  border-color: #82848a !important;
  color: #fff !important;
  outline: none;
}

.y-button--info.is-plain.is-disabled,
.y-button--info.is-plain.is-disabled:active,
.y-button--info.is-plain.is-disabled:focus,
.y-button--info.is-plain.is-disabled:hover {
  color: #bcbec2 !important;
  background-color: #f4f4f5 !important;
  border-color: #e9e9eb !important;
}

.y-button--link {
  border-color: transparent;
  color: @primary-color;
  background-color: transparent;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.y-button--link:focus,
.y-button--link:hover {
  color: mix(#fff, @primary-color, 20%);
  border-color: transparent !important;
  background-color: transparent !important;
}

.y-button--link:active {
  color: color(~`colorPalette('@{primary-color}', 4) `);
  background-color: transparent !important;
}

.y-button--link.is-disabled,
.y-button--link.is-disabled:focus,
.y-button--link.is-disabled:hover,
.y-button--link:active {
  border-color: transparent !important;
}
